package com.szqhyxj.youxiangju.biz.card.addCard;

import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;

import com.szqhyxj.youxiangju.BaseActivity;
import com.szqhyxj.youxiangju.R;
import com.szqhyxj.youxiangju.biz.card.CardActivity;
import com.szqhyxj.youxiangju.biz.plan.RepaymentActivity;
import com.szqhyxj.youxiangju.sys.components.NavigationBar;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 *
 */
public class BinCardSucceedActivity extends BaseActivity implements NavigationBar.NavigationBarListener {
    public static final String CONTENT = "content";
    @BindView(R.id.navigationBar)
    NavigationBar navigationBar;

    public static void start(BaseActivity activity, String msg) {
        Intent intent = new Intent();
        intent.putExtra(CONTENT, msg);
        intent.setClass(activity, BinCardSucceedActivity.class);
        activity.startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_succeed_bin);
        ButterKnife.bind(this);

        navigationBar.setNavigationBarListener(this);

        Intent intent = getIntent();
        String stContent = intent.getStringExtra(CONTENT);



    }

    @OnClick({R.id.achieve})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.achieve:
                RepaymentActivity.start(this);
                break;

        }
    }

    @Override
    public void navigationLeft() {
        CardActivity.start(this);
    }

    @Override
    public void navigationRight() {

    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event){
        if (keyCode == KeyEvent.KEYCODE_BACK) {
            CardActivity.start(this);
        }

        return super.onKeyDown(keyCode, event);
    }
}
